<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: Dimension Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00085.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<div class="title">Dimension Class Reference<div class="ingroups"><a class="el" href="a00519.html">mapping - classes representing mathematical mappings</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Dimension" -->
<p>Specifies a dimension for mappings (like time, frequency, etc.)  
 <a href="a00085.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00298_source.html">MappingBase.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for Dimension:</div>
<div class="dyncontent">
<div class="center"><img src="a00732.png" border="0" usemap="#Dimension_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00733.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a98893d7be4182e964c9c3e495fed3cac"></a><!-- doxytag: member="Dimension::DimensionIDMap" ref="a98893d7be4182e964c9c3e495fed3cac" args="" -->
typedef std::map&lt; std::string, <br class="typebreak"/>
int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a98893d7be4182e964c9c3e495fed3cac">DimensionIDMap</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Type for map from dimension name to ID. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a110a42d6dac62cbbf05514781be20bd3"></a><!-- doxytag: member="Dimension::DimensionNameType" ref="a110a42d6dac62cbbf05514781be20bd3" args="" -->
typedef DimensionIDMap::key_type&#160;</td><td class="memItemRight" valign="bottom"><b>DimensionNameType</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad9ba8fa6cca0539358c5351eec142132"></a><!-- doxytag: member="Dimension::DimensionIdType" ref="ad9ba8fa6cca0539358c5351eec142132" args="" -->
typedef DimensionIDMap::mapped_type&#160;</td><td class="memItemRight" valign="bottom"><b>DimensionIdType</b></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aab6f22bcb151f1b29ece09e500643fc3"></a><!-- doxytag: member="Dimension::Dimension" ref="aab6f22bcb151f1b29ece09e500643fc3" args="(const DimensionNameType &amp;name)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#aab6f22bcb151f1b29ece09e500643fc3">Dimension</a> (const DimensionNameType &amp;name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new dimension instance representing the dimension with the passed name. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa28efdf18dbf57fdc444f2dd75f3da36"></a><!-- doxytag: member="Dimension::operator==" ref="aa28efdf18dbf57fdc444f2dd75f3da36" args="(const Dimension &amp;other) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#aa28efdf18dbf57fdc444f2dd75f3da36">operator==</a> (const <a class="el" href="a00085.html">Dimension</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the ids of the two dimensions are equal. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a3ecf516080e05e566b995ceec18681e4">operator&lt;</a> (const <a class="el" href="a00085.html">Dimension</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the id of the other dimension is greater then the id of this dimension.  <a href="#a3ecf516080e05e566b995ceec18681e4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a28bb1ac7d3b0ed4e8fd43c54203c552b"></a><!-- doxytag: member="Dimension::operator&lt;=" ref="a28bb1ac7d3b0ed4e8fd43c54203c552b" args="(const Dimension &amp;other) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a28bb1ac7d3b0ed4e8fd43c54203c552b">operator&lt;=</a> (const <a class="el" href="a00085.html">Dimension</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sorting operator by dimension ID. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b87afee490115d91184cadb4dbd19fb"></a><!-- doxytag: member="Dimension::operator&gt;" ref="a7b87afee490115d91184cadb4dbd19fb" args="(const Dimension &amp;other) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a7b87afee490115d91184cadb4dbd19fb">operator&gt;</a> (const <a class="el" href="a00085.html">Dimension</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sorting operator by dimension ID. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a63668e024e4a1ba8ac2d819bdf01de23"></a><!-- doxytag: member="Dimension::operator&gt;=" ref="a63668e024e4a1ba8ac2d819bdf01de23" args="(const Dimension &amp;other) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a63668e024e4a1ba8ac2d819bdf01de23">operator&gt;=</a> (const <a class="el" href="a00085.html">Dimension</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sorting operator by dimension ID. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a17b7c615400bc79a9e7fcc40f17914dc"></a><!-- doxytag: member="Dimension::operator!=" ref="a17b7c615400bc79a9e7fcc40f17914dc" args="(const Dimension &amp;other) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a17b7c615400bc79a9e7fcc40f17914dc">operator!=</a> (const <a class="el" href="a00085.html">Dimension</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sorting operator by dimension ID. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a722a82180c4e8ea5bf2a4a34898a841d"></a><!-- doxytag: member="Dimension::getName" ref="a722a82180c4e8ea5bf2a4a34898a841d" args="() const " -->
DimensionNameType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a722a82180c4e8ea5bf2a4a34898a841d">getName</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of this dimension. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">DimensionIdType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a920a9f94db7163fa08ae0f00956d95e7">getID</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the unique id of the dimension this instance represents.  <a href="#a920a9f94db7163fa08ae0f00956d95e7"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="a00085.html">Dimension</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a0ebe0eeec14af70b3f75f675c3eb7a7b">time_static</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut to the time <a class="el" href="a00085.html" title="Specifies a dimension for mappings (like time, frequency, etc.)">Dimension</a>, same as 'Dimension("time")', but spares the parsing of a string.  <a href="#a0ebe0eeec14af70b3f75f675c3eb7a7b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="a00085.html">Dimension</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#aad8d4dbdfadd58664a90f34ce4d8154e">frequency_static</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut to the frequency <a class="el" href="a00085.html" title="Specifies a dimension for mappings (like time, frequency, etc.)">Dimension</a>, same as 'Dimension("frequency")', but spares the parsing of a string.  <a href="#aad8d4dbdfadd58664a90f34ce4d8154e"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a16cb1f186dd3f48d33a4aebe948001d7"></a><!-- doxytag: member="Dimension::time" ref="a16cb1f186dd3f48d33a4aebe948001d7" args="" -->
static const <a class="el" href="a00085.html">Dimension</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a16cb1f186dd3f48d33a4aebe948001d7">time</a> = Dimension::time_static()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut to the time <a class="el" href="a00085.html" title="Specifies a dimension for mappings (like time, frequency, etc.)">Dimension</a>, same as 'Dimension("time")', but spares the parsing of a string. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4360e7d88c881d06ee61033ad99d66f"></a><!-- doxytag: member="Dimension::frequency" ref="ad4360e7d88c881d06ee61033ad99d66f" args="" -->
static const <a class="el" href="a00085.html">Dimension</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#ad4360e7d88c881d06ee61033ad99d66f">frequency</a> = Dimension::frequency_static()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut to the frequency <a class="el" href="a00085.html" title="Specifies a dimension for mappings (like time, frequency, etc.)">Dimension</a>, same as 'Dimension("frequency")', but spares the parsing of a string. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8bac5d3aa88306fbd0192d13b80ed668"></a><!-- doxytag: member="Dimension::DimensionNameMap" ref="a8bac5d3aa88306fbd0192d13b80ed668" args="" -->
typedef std::map<br class="typebreak"/>
&lt; DimensionIdType, <br class="typebreak"/>
DimensionNameType &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a8bac5d3aa88306fbd0192d13b80ed668">DimensionNameMap</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Type for map from ID to dimension name. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="a00085.html#a98893d7be4182e964c9c3e495fed3cac">DimensionIDMap</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#ada939a13a34a9c28edff67670caf873d">dimensionIDs</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">stores the registered dimensions ids.  <a href="#ada939a13a34a9c28edff67670caf873d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="a00085.html#a8bac5d3aa88306fbd0192d13b80ed668">DimensionNameMap</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a5dd35619b73de635a0a57aca248af68a">dimensionNames</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="a00136.html" title="Represents a changeable mapping (mathematical function) from at least time to Argument::mapped_type.">Mapping</a> from id to name of registered dimensions.  <a href="#a5dd35619b73de635a0a57aca248af68a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static DimensionIdType &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a7b9273f9c3c429aa1cc924964645936e">nextFreeID</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores the next free ID for a new dimension.  <a href="#a7b9273f9c3c429aa1cc924964645936e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a33426bf3820f16042adcb24948592877"></a><!-- doxytag: member="Dimension::getDimensionID" ref="a33426bf3820f16042adcb24948592877" args="(const DimensionNameType &amp;name)" -->
static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a33426bf3820f16042adcb24948592877">getDimensionID</a> (const DimensionNameType &amp;name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an instance of dimension which represents the dimension with the passed name. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4d051377fa3482bdb1f6463eaded749e"></a><!-- doxytag: member="Dimension::id" ref="a4d051377fa3482bdb1f6463eaded749e" args="" -->
DimensionIdType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#a4d051377fa3482bdb1f6463eaded749e">id</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The unique id of the dimension this instance represents. <br/></td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6723258d45f8e2d57a861db96d05a43"></a><!-- doxytag: member="Dimension::operator&lt;&lt;" ref="aa6723258d45f8e2d57a861db96d05a43" args="(std::ostream &amp;out, const Dimension &amp;d)" -->
std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00085.html#aa6723258d45f8e2d57a861db96d05a43">operator&lt;&lt;</a> (std::ostream &amp;out, const <a class="el" href="a00085.html">Dimension</a> &amp;d)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Output operator for a dimension. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Specifies a dimension for mappings (like time, frequency, etc.) </p>
<p>The dimension is represented external by a string (like "time") and internally by an unique ID.</p>
<p>Note: Since the ID for a Dimensions is set the first time an instance of this dimensions is created and the id is used to provide a defined ordering of the Dimensions it DOES matter which dimensions are instantiated the first time. Only the time dimension will always have zero as unique id.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Karl Wessel </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ada939a13a34a9c28edff67670caf873d"></a><!-- doxytag: member="Dimension::dimensionIDs" ref="ada939a13a34a9c28edff67670caf873d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00085.html#a98893d7be4182e964c9c3e495fed3cac">Dimension::DimensionIDMap</a> &amp; Dimension::dimensionIDs </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>stores the registered dimensions ids. </p>
<p>Uses "construct-on-first-use" idiom to ensure correct initialization of static members. </p>

<p>Referenced by <a class="el" href="a00085.html#a33426bf3820f16042adcb24948592877">getDimensionID()</a>.</p>
<div class="fragment"><pre class="fragment">                                                 {
  <span class="comment">//use &quot;construct-on-first-use&quot; idiom to ensure correct order of</span>
  <span class="comment">//static initialization</span>
  <span class="keyword">static</span> <a class="code" href="a00085.html#a98893d7be4182e964c9c3e495fed3cac" title="Type for map from dimension name to ID.">DimensionIDMap</a>* dimIDs = <span class="keyword">new</span> <a class="code" href="a00085.html#a98893d7be4182e964c9c3e495fed3cac" title="Type for map from dimension name to ID.">DimensionIDMap</a>();
  <span class="keywordflow">return</span> *dimIDs;
}
</pre></div>
</div>
</div>
<a class="anchor" id="a5dd35619b73de635a0a57aca248af68a"></a><!-- doxytag: member="Dimension::dimensionNames" ref="a5dd35619b73de635a0a57aca248af68a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00085.html#a8bac5d3aa88306fbd0192d13b80ed668">Dimension::DimensionNameMap</a> &amp; Dimension::dimensionNames </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="a00136.html" title="Represents a changeable mapping (mathematical function) from at least time to Argument::mapped_type.">Mapping</a> from id to name of registered dimensions. </p>
<p>Uses "construct-on-first-use" idiom to ensure correct initialization of static members. </p>

<p>Referenced by <a class="el" href="a00085.html#a33426bf3820f16042adcb24948592877">getDimensionID()</a>, and <a class="el" href="a00085.html#a722a82180c4e8ea5bf2a4a34898a841d">getName()</a>.</p>
<div class="fragment"><pre class="fragment">                                                     {
  <span class="comment">//use &quot;construct-on-first-use&quot; idiom to ensure correct order of</span>
  <span class="comment">//static initialization</span>
  <span class="keyword">static</span> <a class="code" href="a00085.html#a8bac5d3aa88306fbd0192d13b80ed668" title="Type for map from ID to dimension name.">DimensionNameMap</a>* names = <span class="keyword">new</span> <a class="code" href="a00085.html#a8bac5d3aa88306fbd0192d13b80ed668" title="Type for map from ID to dimension name.">DimensionNameMap</a>();
  <span class="keywordflow">return</span> *names;
}
</pre></div>
</div>
</div>
<a class="anchor" id="aad8d4dbdfadd58664a90f34ce4d8154e"></a><!-- doxytag: member="Dimension::frequency_static" ref="aad8d4dbdfadd58664a90f34ce4d8154e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00085.html">Dimension</a> &amp; Dimension::frequency_static </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Shortcut to the frequency <a class="el" href="a00085.html" title="Specifies a dimension for mappings (like time, frequency, etc.)">Dimension</a>, same as 'Dimension("frequency")', but spares the parsing of a string. </p>
<p>This method should be used instead of the static "frequency" member when used during initialization of static variables since it assures the correct order of initialization. </p>
<div class="fragment"><pre class="fragment">                                       {
  <span class="keyword">static</span> <a class="code" href="a00085.html" title="Specifies a dimension for mappings (like time, frequency, etc.)">Dimension</a>* freq = <span class="keyword">new</span> <a class="code" href="a00085.html" title="Specifies a dimension for mappings (like time, frequency, etc.)">Dimension</a>(<span class="stringliteral">&quot;frequency&quot;</span>);
  <span class="keywordflow">return</span> *freq;
}
</pre></div>
</div>
</div>
<a class="anchor" id="a920a9f94db7163fa08ae0f00956d95e7"></a><!-- doxytag: member="Dimension::getID" ref="a920a9f94db7163fa08ae0f00956d95e7" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DimensionIdType Dimension::getID </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the unique id of the dimension this instance represents. </p>
<p>The id is used to uniquely identify dimensions as well as to provide a sorting of dimensions. Note: The "time"-dimension will always have the ID zero. </p>
<div class="fragment"><pre class="fragment">{ <span class="keywordflow">return</span> <a class="code" href="a00085.html#a4d051377fa3482bdb1f6463eaded749e" title="The unique id of the dimension this instance represents.">id</a>; }
</pre></div>
</div>
</div>
<a class="anchor" id="a7b9273f9c3c429aa1cc924964645936e"></a><!-- doxytag: member="Dimension::nextFreeID" ref="a7b9273f9c3c429aa1cc924964645936e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Dimension::DimensionIdType &amp; Dimension::nextFreeID </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Stores the next free ID for a new dimension. </p>
<p>Uses "construct-on-first-use" idiom to ensure correct initialization of static members. </p>

<p>Referenced by <a class="el" href="a00085.html#a33426bf3820f16042adcb24948592877">getDimensionID()</a>.</p>
<div class="fragment"><pre class="fragment">                                                 {
  <span class="keyword">static</span> Dimension::DimensionIdType* nextID = <span class="keyword">new</span> Dimension::DimensionIdType(1);
  <span class="keywordflow">return</span> *nextID;
}
</pre></div>
</div>
</div>
<a class="anchor" id="a3ecf516080e05e566b995ceec18681e4"></a><!-- doxytag: member="Dimension::operator&lt;" ref="a3ecf516080e05e566b995ceec18681e4" args="(const Dimension &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Dimension::operator&lt; </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00085.html">Dimension</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns true if the id of the other dimension is greater then the id of this dimension. </p>
<p>This is needed to be able to use <a class="el" href="a00085.html" title="Specifies a dimension for mappings (like time, frequency, etc.)">Dimension</a> as a key in std::map. </p>

<p>References <a class="el" href="a00085.html#a4d051377fa3482bdb1f6463eaded749e">id</a>.</p>
<div class="fragment"><pre class="fragment">{ <span class="keywordflow">return</span> <span class="keywordtype">id</span>  &lt; other.<a class="code" href="a00085.html#a4d051377fa3482bdb1f6463eaded749e" title="The unique id of the dimension this instance represents.">id</a>; }
</pre></div>
</div>
</div>
<a class="anchor" id="a0ebe0eeec14af70b3f75f675c3eb7a7b"></a><!-- doxytag: member="Dimension::time_static" ref="a0ebe0eeec14af70b3f75f675c3eb7a7b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00085.html">Dimension</a> &amp; Dimension::time_static </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Shortcut to the time <a class="el" href="a00085.html" title="Specifies a dimension for mappings (like time, frequency, etc.)">Dimension</a>, same as 'Dimension("time")', but spares the parsing of a string. </p>
<p>This method should be used instead of the static "time" member when used during initialization of static variables since it assures the correct order of initialization. </p>

<p>References <a class="el" href="a00085.html#a16cb1f186dd3f48d33a4aebe948001d7">time</a>.</p>
<div class="fragment"><pre class="fragment">                                  {
  <span class="comment">//use &quot;construct-on-first-use&quot; idiom to ensure correct order of</span>
  <span class="comment">//static initialization</span>
  <span class="keyword">static</span> <a class="code" href="a00085.html" title="Specifies a dimension for mappings (like time, frequency, etc.)">Dimension</a>* <a class="code" href="a00085.html#a16cb1f186dd3f48d33a4aebe948001d7" title="Shortcut to the time Dimension, same as &#39;Dimension(&quot;time&quot;)&#39;, but spares the parsing of a string...">time</a> = <span class="keyword">new</span> <a class="code" href="a00085.html" title="Specifies a dimension for mappings (like time, frequency, etc.)">Dimension</a>(<span class="stringliteral">&quot;time&quot;</span>);
  <span class="keywordflow">return</span> *<a class="code" href="a00085.html#a16cb1f186dd3f48d33a4aebe948001d7" title="Shortcut to the time Dimension, same as &#39;Dimension(&quot;time&quot;)&#39;, but spares the parsing of a string...">time</a>;
}
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/<a class="el" href="a00298_source.html">MappingBase.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/MappingBase.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00085.html">Dimension</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:32 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
